import Vue from 'vue';

import {
    CART_NUM,
    THEMES,
    BOTTOMCOLUMN,
    ADDRESS_DETAIL,
    INTEGRALNAME,
    ACCOUNT_MESSAGE,
} from './mutation-types'


export default {
    // 购物车角标
    [CART_NUM](state, { cartNum }) {
        state.cartNum = cartNum
    },
    //地址
    setRegion(state, region) {
        state.region = region
    },
    //详细地址
    setaddressDetail(state, addressDetail) {
        state.addressDetail = addressDetail
    },
    setLat(state, lat) {
        state.lat = lat
    },
    setlng(state, lng) {
        state.lng = lng
    },
	setInvitCode(state, invitCode) {
		state.invitCode = invitCode
	},
    [THEMES](state, { themes }) {
        state.themes = themes
    },
    [BOTTOMCOLUMN](state, { bottomColumn }) {
        state.bottomColumn = bottomColumn
    },
    //积分名字
    [INTEGRALNAME](state, { integralName }) {
        state.integralName = integralName
    },
    [ACCOUNT_MESSAGE](state, { accountMessage }) {
        state.accountMessage = accountMessage
    },

    SET_USERINFO(state, userInfo) {
        state.userInfo = userInfo
    },

    SET_EnableWeixinLogin(state, enableWeixinLogin) {
        state.enableWeixinLogin = enableWeixinLogin
    },
	// 设置当前位置
	setCurLocation(state, data) {
	    state.curLocation = data
	},
}